package com.yuhang.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yuhang.entity.HyPayProject;
import com.yuhang.mapper.HyPayProjectMapper;
import com.yuhang.service.HyPayProjectService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author yuhang
 * @since 2021-03-11
 */
@Service
public class HyPayProjectServiceImpl extends ServiceImpl<HyPayProjectMapper, HyPayProject> implements HyPayProjectService {

    @Autowired
    private HyPayProjectMapper hyPayProjectMapper;

    @Override
    public IPage<HyPayProject> selectByPage(int pageNum, int pageSize) {
        Page<HyPayProject> page = new Page(pageNum,pageSize);
        QueryWrapper qw = new QueryWrapper();
        qw.eq("state",1);
        IPage<HyPayProject> hyPayProjectIPage = hyPayProjectMapper.selectPage(page,qw);
        return hyPayProjectIPage;
    }
}
